import { Menu } from "ant-design-vue";
import bjIcon from "@/components/bj-icon";
const SubMenu = {
  template: `
      <a-sub-menu :key="menuInfo.id" v-bind="$props" v-on="$listeners">
        <span slot="title">
          <span>{{ menuInfo.menuName }}</span>
        </span>
        <template v-for="item in menuInfo.childs">
          <a-menu-item v-if="!item.childs" :key="item.id">
            <span style="width:6px;height:6px;border-radius:59%;border:1px solid #8A9295;display:inline-block;margin-top:-2px;vertical-align:middle;"></span>
            <span>{{ item.menuName }}</span>
          </a-menu-item>
          <sub-menu v-else :key="item.id" :menu-info="item" />
        </template>
      </a-sub-menu>
    `,
  name: "SubMenu",
  isSubMenu: true,
  props: {
    ...Menu.SubMenu.props,
    menuInfo: {
      type: Object,
      default: () => ({}),
    },
  },
  components: {
    bjIcon,
  },
};
export default SubMenu;
